CREATE TABLE [dbo].[tb_Inasistencias]
(
[idInasistencia] [int] NOT NULL IDENTITY(1, 1),
[Alumno] [int] NOT NULL,
[Fecha] [datetime] NOT NULL,
[Causa] [int] NOT NULL,
[Cursada] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Inasistencias] ADD CONSTRAINT [PK_tb_Inacistencias] PRIMARY KEY NONCLUSTERED  ([idInasistencia]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [idx_Alumno] ON [dbo].[tb_Inasistencias] ([Alumno]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Inasistencias] ADD CONSTRAINT [FK_tb_Inasistencias_tb_CausasDeInacistencias] FOREIGN KEY ([Causa]) REFERENCES [dbo].[tb_CausasDeInasistencias] ([idCausa])
GO
ALTER TABLE [dbo].[tb_Inasistencias] WITH NOCHECK ADD CONSTRAINT [FK_tb_Inasistencias_tb_Cursadas] FOREIGN KEY ([Cursada]) REFERENCES [dbo].[tb_Cursadas] ([idCursada])
GO
ALTER TABLE [dbo].[tb_Inasistencias] NOCHECK CONSTRAINT [FK_tb_Inasistencias_tb_Cursadas]
GO
